{% extends 'base.html' %}

{% block content %}
<div class="container">
    <h1>添加音乐</h1>
    <form method="post">
        <div class="form-group">
            <label for="title">标题</label>
            <input type="text" class="form-control" id="title" name="title" required>
        </div>
        <div class="form-group">
            <label for="artist">艺术家</label>
            <input type="text" class="form-control" id="artist" name="artist">
        </div>
        <div class="form-group">
            <label for="url">音乐链接</label>
            <input type="url" class="form-control" id="url" name="url" required>
            <small class="form-text text-muted">支持直接输入音乐文件URL或网易云音乐外链</small>
        </div>
        <div class="form-group">
            <label for="genre">流派</label>
            <select class="form-control" id="genre" name="genre">
                <option value="">选择流派</option>
                <option value="流行">流行</option>
                <option value="摇滚">摇滚</option>
                <option value="民谣">民谣</option>
                <option value="电子">电子</option>
                <option value="古典">古典</option>
            </select>
        </div>
        <button type="submit" class="btn btn-primary">添加</button>
        <a href="{{ url_for('music') }}" class="btn btn-secondary">取消</a>
    </form>
</div>
{% endblock %} 